package ch.comet.Sandbox;

import java.io.IOException;

import android.app.Activity;
import android.media.MediaPlayer;
import android.os.Bundle;
import android.widget.TextView;
import java.util.Timer;

public class SandboxActivity extends Activity {
    /** Called when the activity is first created. */

    private MediaPlayer mp;
    private static TextView tv;

    @Override   
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        tv = new TextView(this);
        tv.setText("Erstes Hello World");
        tv.setText(R.string.HelloResourceString);
        tv.append("\nhalli hallo");
        setContentView(tv);
        
        
        //AutoStringUpdater asu = new AutoStringUpdater();
        //asu.schedule...
        
        
        mp = new MediaPlayer();
        /*try {
			mp.setDataSource("http://129.33.149.207:8080/tada.mp3");
	        mp.prepare();
	        mp.start();
		} catch (IllegalArgumentException e) {
			e.printStackTrace();
		} catch (SecurityException e) {
			e.printStackTrace();
		} catch (IllegalStateException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		}*/

    }

	@Override
	protected void onDestroy() {
		// TODO Auto-generated method stub
		super.onDestroy();
		mp.release();
	}
	
	static void updateTexte(String update) {
		tv.append("\n" + update);
	}
    
    
}